home *** CD-ROM | disk | FTP | other *** search
- *** 1.13 1993/03/29 03:53:00
- --- Changelo 1993/05/29 21:19:53
- ***************
- *** 308,310 ****
- --- 308,315 ----
- this problem (see patch to config/m68k.md)
-
- ---------------------------- Patchlevel 18 -----------------------------------
- + filebuf.cc floatcon.cc outfloat.cc streambu.cc xinteger.cc
- + xrationa.cc iomanip.h streambu.h :: ++jrb
- + sync up with libg++ 2.3.1
- +
- + ---------------------------- Patchlevel 19 -----------------------------------
- *** 1.13 1993/03/29 03:53:00
- --- PatchLev.h 1993/05/29 21:19:54
- ***************
- *** 1,5 ****
-
- ! #define PatchLevel "18"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,5 ----
-
- ! #define PatchLevel "19"
-
- /*
- * the Patch Level above is to identify the version
- *** 1.10 1993/02/05 04:59:04
- --- filebuf.cc 1993/05/29 21:19:56
- ***************
- *** 195,201 ****
- }
- if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
- omode = O_RDWR;
- ! read_write = 0;
- }
- int fdesc = ::open(filename, omode|oflags, oprot);
- if (fdesc < 0)
- --- 195,201 ----
- }
- if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
- omode = O_RDWR;
- ! read_write &= _S_IS_APPENDING;
- }
- int fdesc = ::open(filename, omode|oflags, oprot);
- if (fdesc < 0)
- ***************
- *** 287,296 ****
- // Flush all line buffered files before reading.
- streambuf::flush_all_linebuffered();
- }
- ! #if 1
- ! if (pptr() > pbase())
- ! if (do_flush()) return EOF;
- ! #endif
-
- _G_ssize_t count = sys_read(base(), ebuf() - base());
- if (count <= 0) {
- --- 287,294 ----
- // Flush all line buffered files before reading.
- streambuf::flush_all_linebuffered();
- }
- !
- ! switch_to_get_mode();
-
- _G_ssize_t count = sys_read(base(), ebuf() - base());
- if (count <= 0) {
- ***************
- *** 329,340 ****
- _G_ssize_t count = sys_write(data, to_do);
- if (_cur_column)
- _cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
- - if (count != to_do)
- - return EOF;
- setg(base(), base(), base());
- if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
- else setp(base(), ebuf());
- ! return 0;
- }
-
- int filebuf::sync()
- --- 327,336 ----
- _G_ssize_t count = sys_write(data, to_do);
- if (_cur_column)
- _cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
- setg(base(), base(), base());
- if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
- else setp(base(), ebuf());
- ! return count != to_do ? EOF : 0;
- }
-
- int filebuf::sync()
- *** 1.1 1993/01/17 03:34:31
- --- floatcon.cc 1993/05/29 21:19:57
- ***************
- *** 2005,2011 ****
- i = 1;
- }
- j = sizeof(unsigned long);
- ! for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
- j <<= 1) result_k++;
- result = Balloc(result_k);
- s = s0 = (char *)result;
- --- 2005,2011 ----
- i = 1;
- }
- j = sizeof(unsigned long);
- ! for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j <= i;
- j <<= 1) result_k++;
- result = Balloc(result_k);
- s = s0 = (char *)result;
- *** 1.4 1993/02/05 04:59:04
- --- outfloat.cc 1993/05/29 21:20:04
- ***************
- *** 141,147 ****
- // Calculate the width (before padding).
- int unpadded_width =
- (print_sign != 0) + trailing_zeroes + exponent_size + show_dot
- ! + useful_digits + (decpt > 0 ? 0 : 1 - decpt);
-
- int padding = width > unpadded_width ? width - unpadded_width : 0;
- if (padding > 0
- --- 141,149 ----
- // Calculate the width (before padding).
- int unpadded_width =
- (print_sign != 0) + trailing_zeroes + exponent_size + show_dot
- ! + useful_digits
- ! + (decpt > useful_digits ? decpt - useful_digits
- ! : decpt > 0 ? 0 : 1 - decpt);
-
- int padding = width > unpadded_width ? width - unpadded_width : 0;
- if (padding > 0
- *** 1.8 1993/02/05 04:59:04
- --- streambu.cc 1993/05/29 21:20:07
- ***************
- *** 669,674 ****
- --- 669,675 ----
-
- int backupbuf::pbackfail(int c)
- {
- + if (_gptr <= _eback) {
- // Need to handle a filebuf in write mode (switch to read mode). FIXME!
-
- if (have_backup() && !in_backup()) {
- ***************
- *** 694,703 ****
- setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
- _aux_limit = _gptr;
- }
- ! _gptr--;
- ! if (c != EOF && *_gptr != c)
- ! *_gptr = c;
- ! return (unsigned char)*_gptr;
- }
-
- unsigned __adjust_column(unsigned start, const char *line, int count)
- --- 695,705 ----
- setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
- _aux_limit = _gptr;
- }
- ! }
- ! _gptr--;
- ! if (c != EOF && *_gptr != c)
- ! *_gptr = c;
- ! return (unsigned char)*_gptr;
- }
-
- unsigned __adjust_column(unsigned start, const char *line, int count)
- *** 1.8 1992/12/14 19:14:32
- --- xinteger.cc 1993/05/29 21:20:10
- ***************
- *** 31,39 ****
- #include <xinteger.h>
- #include <std.h>
- #include <ctype.h>
- - #include <math.h>
- #include <float.h>
- #include <limits.h>
- #include <xobstack.h>
- #include <xallocri.h>
- #include <new.h>
- --- 31,39 ----
- #include <xinteger.h>
- #include <std.h>
- #include <ctype.h>
- #include <float.h>
- #include <limits.h>
- + #include <math.h>
- #include <xobstack.h>
- #include <xallocri.h>
- #include <new.h>
- ***************
- *** 327,333 ****
-
- IntRep* Icopy_zero(IntRep* old)
- {
- ! if (old == 0)
- return &_ZeroRep;
-
- old->len = 0;
- --- 327,333 ----
-
- IntRep* Icopy_zero(IntRep* old)
- {
- ! if (old == 0 || STATIC_IntRep(old))
- return &_ZeroRep;
-
- old->len = 0;
- ***************
- *** 2315,2321 ****
- s >> ws;
- if (!s.good())
- {
- ! s.set(_fail);
- return s;
- }
-
- --- 2315,2321 ----
- s >> ws;
- if (!s.good())
- {
- ! s.set(ios::failbit);
- return s;
- }
-
- ***************
- *** 2395,2401 ****
- if (s.good())
- s.putback(ch);
- if (!got_one)
- ! s.set(_fail);
-
- if (sgn == '-')
- y.negate();
- --- 2395,2401 ----
- if (s.good())
- s.putback(ch);
- if (!got_one)
- ! s.set(ios::failbit);
-
- if (sgn == '-')
- y.negate();
- ***************
- *** 2425,2428 ****
- {
- (*lib_error_handler)("Integer", msg);
- }
- -
- --- 2425,2427 ----
- *** 1.4 1992/06/03 02:12:17
- --- xrationa.cc 1993/05/29 21:20:11
- ***************
- *** 216,229 ****
- {
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) < 0 && sign(r) != 0) q--;
- }
-
- Integer ceil(const Rational& x) return q
- {
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) >= 0 && sign(r) != 0) q++;
- }
-
- Integer round(const Rational& x) return q
- --- 216,229 ----
- {
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) < 0 && sign(r) != 0) --q;
- }
-
- Integer ceil(const Rational& x) return q
- {
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) >= 0 && sign(r) != 0) ++q;
- }
-
- Integer round(const Rational& x) return q
- ***************
- *** 234,242 ****
- if (ucompare(r, x.den) >= 0)
- {
- if (sign(x.num) >= 0)
- ! q++;
- else
- ! q--;
- }
- }
-
- --- 234,242 ----
- if (ucompare(r, x.den) >= 0)
- {
- if (sign(x.num) >= 0)
- ! ++q;
- else
- ! --q;
- }
- }
-
- ***************
- *** 291,297 ****
- Integer q;
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) < 0 && sign(r) != 0) q--;
- return q;
- }
-
- --- 291,297 ----
- Integer q;
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) < 0 && sign(r) != 0) --q;
- return q;
- }
-
- ***************
- *** 300,306 ****
- Integer q;
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) >= 0 && sign(r) != 0) q++;
- return q;
- }
-
- --- 300,306 ----
- Integer q;
- Integer r;
- divide(x.num, x.den, q, r);
- ! if (sign(x.num) >= 0 && sign(r) != 0) ++q;
- return q;
- }
-
- ***************
- *** 313,321 ****
- if (ucompare(r, x.den) >= 0)
- {
- if (sign(x.num) >= 0)
- ! q++;
- else
- ! q--;
- }
- return q;
- }
- --- 313,321 ----
- if (ucompare(r, x.den) >= 0)
- {
- if (sign(x.num) >= 0)
- ! ++q;
- else
- ! --q;
- }
- return q;
- }
-